
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="RIDE" /> 
<meta name="rf-template" content="False" /> 
<style type="text/css">
html {
  font-family: Arial,Helvetica,sans-serif;
  background-color: white;
  color: black;
}
table {
  border-collapse: collapse;
  empty-cells: show;
  margin: 1em 0em;
  border: 0.1em solid black;
}
th, td {
  border-style: solid;
  border-width: 0.05em 0.1em;
  border-color: black;
  padding: 0.1em 0.2em;
  height: 1.5em;
  width: 12em;
}
th {
  background-color: rgb(192, 192, 192);
  color: black;
  border-width: 0.1em;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.1em;
}
td.name {
  background-color: rgb(240, 240, 240);
  letter-spacing: 0.1em;
}
td.name, th.name {
  width: 10em;
}
</style>
<title>Dblibrarydemo Mysql</title>
</head>
<body>
<h1>Dblibrarydemo Mysql</h1>
<table id="settings" border="1">
<tr>
<th class="name">Setting</th>
<th colspan="4">Value</th>
</tr>
<tr>
<td class="name">Documentation</td>
<td colspan="4">This is a sample Robot Library testsuite demonstrating the usage of the Database Library (<a href="http://code.google.com/p/robotframework-dblibrary/">http://code.google.com/p/robotframework-dblibrary/</a>). Please make sure you have setup a proper MySql Database and user according to the instrcutions given in the README.txt bundled with this demo.</td>
</tr>
<tr>
<td class="name">Suite Setup</td>
<td>Connect To Database</td>
<td>com.mysql.jdbc.Driver</td>
<td>jdbc:mysql://localhost:3306/databaselibrarydemo</td>
<td>dblib</td>
</tr>
<tr>
<td class="name">...</td>
<td>dblib</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name">Suite Teardown</td>
<td>Disconnect From Database</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name">Library</td>
<td>org.robot.database.keywords.DatabaseLibrary</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table id="variables" border="1"></table>
<table id="testcases" border="1">
<tr>
<th class="name">Test Case</th>
<th>Action</th>
<th colspan="3">Arguments</th>
</tr>
<tr>
<td class="name"><a name="test_Create Test Table">Create Test Table</a></td>
<td>[Documentation]</td>
<td colspan="3">Creates the test table used for testing throughout the demo.</td>
</tr>
<tr>
<td class="name"></td>
<td>[Tags]</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Setup]</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute SQL</td>
<td>CREATE TABLE DemoTable (Id INT NOT NULL, Name VARCHAR(255))</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute SQL</td>
<td>ALTER TABLE DemoTable ADD PRIMARY KEY (Id);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Teardown]</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="test_Basic Checks">Basic Checks</a></td>
<td>[Documentation]</td>
<td colspan="3">Performs some basic checks on the created DemoTable. You can check the generated Robot Log-File to see the transactions isolation level fetched.</td>
</tr>
<tr>
<td class="name"></td>
<td>Table Must Exist</td>
<td>DemoTable</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Table Must Be Empty</td>
<td>DemoTable</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Check Primary Key Columns For Table</td>
<td>DemoTable</td>
<td>Id</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${TI_LEVEL}=</td>
<td>Get Transaction Isolation Level</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Log</td>
<td>${TI_LEVEL}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="test_Add Content To Table">Add Content To Table</a></td>
<td>[Documentation]</td>
<td colspan="3">Add some records to the DemoTable for further checks.</td>
</tr>
<tr>
<td class="name"></td>
<td>Execute SQL</td>
<td>INSERT INTO DemoTable VALUES(1, 'Donny Darko')</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute SQL</td>
<td>INSERT INTO DemoTable VALUES(2, 'Darth Vader')</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="test_Check Number of Rows">Check Number of Rows</a></td>
<td>[Documentation]</td>
<td colspan="3">Perform some checks related to the number of Rows in the DemoTable.</td>
</tr>
<tr>
<td class="name"></td>
<td>Table Must Contain Number of Rows</td>
<td>DemoTable</td>
<td>2</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Table Must Contain More Than Number Of Rows</td>
<td>DemoTable</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Table Must Contain Less Than Number Of Rows</td>
<td>DemoTable</td>
<td>3</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Tables Must Contain Same Amount of Rows</td>
<td>DemoTable</td>
<td>DemoTable</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="test_Content Check">Content Check</a></td>
<td>[Documentation]</td>
<td colspan="3">Checks for specific content in the DemoTable.You can inspect the Logfile to see the value fetched by the "Read Single Value From Table" keyword.</td>
</tr>
<tr>
<td class="name"></td>
<td>Check Content for Row Identified by Rownum</td>
<td>Id,Name</td>
<td>1|Donny Darko</td>
<td>DemoTable</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>1</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Check Content for Row Identified by WhereClause</td>
<td>Id,Name</td>
<td>2|Darth Vader</td>
<td>DemoTable</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>id=2</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${VALUE}=</td>
<td>Read Single Value From Table</td>
<td>DemoTable</td>
<td>Name</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>id=1</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Log</td>
<td>${VALUE}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="test_Delete Rows From Database">Delete Rows From Database</a></td>
<td>[Documentation]</td>
<td colspan="3">Delete all rows from the database. \n</td>
</tr>
<tr>
<td class="name"></td>
<td>Table Must Contain Number of Rows</td>
<td>DemoTable</td>
<td>2</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Delete all Rows From Table</td>
<td>DemoTable</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Table Must Contain Number of Rows</td>
<td>DemoTable</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="test_Drop Test Table">Drop Test Table</a></td>
<td>[Documentation]</td>
<td colspan="3">Clean up by dropping the DemoTable again.</td>
</tr>
<tr>
<td class="name"></td>
<td>Execute SQL</td>
<td>DROP TABLE DemoTable</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table id="keywords" border="1"></table>
</body>
</html>
